package com.user.domain.entity;

import com.user.domain.repository.UserSignInRepository;
import lombok.Builder;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 大忽悠
 * @create 2022/9/16 8:40
 */
@Data
@Builder
@Slf4j
public class UserSignIn {
    private Integer userId;
    private Integer signInNum;

    /**
     * 签到次数加一
     */
    public static void userSignIn(UserSignInRepository userSignInRepository,Integer uid){
        //登录
        log.info("ID为{}的用户签到次数加一",uid);
        userSignInRepository.signInNumAdd(uid);
    }
}
